import Ajax from './ajax'

const loginApi = data =>{
    return  Ajax({
        url: '/user/login',
        method: 'POST',
        data
    })
}

//用户接口
const userInfoApi = id => {
   return Ajax({
      // url:'/user/' + id
       url: `/user/${id}`
   })
}

//用户所有 列表接口
const userMenuApi = () => {
    return Ajax({
        url: '/user/menu/list'
    })
}
const userRoleApi = ids => {
    return Ajax({
        url: '/role/ids',
        params: {ids}
    })
}

export {
    loginApi,
    userInfoApi,
    userMenuApi,
    userRoleApi
}